﻿<%@ Page Title="" Language="C#" StylesheetTheme="AdminTheme" MasterPageFile="~/Backend/mtpAdmin.master"
    AutoEventWireup="true" CodeBehind="UploadFileList.aspx.cs" Inherits="HPortal.Backend.UploadFileList" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div class="dvTitleContent"> 

    Quản lý tài liệu :: Danh sách tài liệu</div>
    <table class="MainTable">
        <tr>
            <td>
                Chuyên mục:
            </td>
            <td>
                <asp:DropDownList ID="cboChannelList" runat="server" Width="200px" AutoPostBack="True"
                    OnSelectedIndexChanged="cboChannelList_SelectedIndexChanged">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td>
                Khối tin:
            </td>
            <td>
                <asp:DropDownList ID="cboPanelList" runat="server" Width="200px" AutoPostBack="True"
                    OnSelectedIndexChanged="cboPanelList_SelectedIndexChanged">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <fieldset>
                    <legend>Danh sách tài liệu trên khối tin</legend>
                    <asp:GridView ID="grvArticlelList" runat="server" AutoGenerateColumns="False" SkinID="tGridview">
                        <Columns>
                            <asp:BoundField DataField="Title" HeaderText="Tên tài liệu" ItemStyle-HorizontalAlign="Justify"/>
                            <asp:BoundField DataField="FileType" HeaderText="Loại tài liệu" />
                            <asp:BoundField DataField="DocumentSize" HeaderText="Kích thước(KB)" />
                            <asp:BoundField DataField="PublishedTime" HeaderText="Xuất bản" />
                            <asp:TemplateField ShowHeader="False">
                                <ItemTemplate>
                                    <a href='<%# System.Configuration.ConfigurationManager.AppSettings["OsPortal.PortalCore.WebPathUserFilesUpload"].ToString() + "/" + DataBinder.Eval(Container, "DataItem.UploadFileID") + "." + DataBinder.Eval(Container, "DataItem.FileExt").ToString().Trim()%>'>
                                        Download </a>
                                </ItemTemplate>
                                </asp:TemplateField>
                                <asp:HyperLinkField DataNavigateUrlFields="UploadFileID" DataNavigateUrlFormatString="MyFileUpload.aspx?UploadFileID={0}"
                                    Text="Cập nhật" />
                                <asp:TemplateField ShowHeader="False">
                                    <itemtemplate>
                                    <asp:LinkButton ID="lnkDelete" runat="server" CausesValidation="False" CommandName="Select"
                                        Text="Xóa" CommandArgument='<%# Eval("UploadFileID", "{0}") %>' 
                                        onclick="lnkDelete_Click"></asp:LinkButton>
                                </itemtemplate>
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                </fieldset>
            </td>
        </tr>
    </table>
</asp:Content>
